<?php

namespace backend\models;

use Yii;

/**
 * This is the model class for table "user_diy".
 *
 * @property integer $id
 * @property integer $user_id
 * @property integer $diy_id
 * @property string $name
 * @property string $tips
 * @property integer $img_small_id
 * @property integer $img_thumb_id
 * @property integer $img_url_id
 * @property integer $create_time
 * @property integer $from_uid
 * @property integer $from_id
 */
class UserDiy extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'user_diy';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['user_id'], 'required'],
            [['user_id', 'diy_id', 'img_small_id', 'img_thumb_id', 'img_url_id', 'create_time', 'from_uid', 'from_id'], 'integer'],
            [['name'], 'string', 'max' => 64],
            [['tips'], 'string', 'max' => 512]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'user_id' => Yii::t('app', 'User Diy User ID'),
            'diy_id' => Yii::t('app', 'User Diy Diy ID'),
            'name' => Yii::t('app', 'User Diy Name'),
            'tips' => Yii::t('app', 'User Diy Tips'),
            'img_small_id' => Yii::t('app', 'User Diy Img Small ID'),
            'img_thumb_id' => Yii::t('app', 'User Diy Img Thumb ID'),
            'img_url_id' => Yii::t('app', 'User Diy Img Url ID'),
            'create_time' => Yii::t('app', 'Create Time'),
            'from_uid' => Yii::t('app', 'User Diy From Uid'),
            'from_id' => Yii::t('app', 'User Diy From ID'),
        ];
    }
}
